package com.neusoft.hifly.push.sms.gateway.pojo;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/**
 * Title: 短信服务
 * <p>
 * Description: 短信待发列表
 * <p>
 * Copyright: 2019
 * <p>
 * Company: 东软汉枫
 *
 * @author lh_neu
 * @version 1.0.0
 */
public class SMSToDoObj implements Serializable {

	// 不需要回复
	public static final String STATUS_0 = "0";
	// 需要回复
	public static final String STATUS_1 = "1";
	// 需要进行选人操作
	public static final String STATUS_2 = "2";

	public static final String TABLE_NAME = "SMS_TODO";
	public static final String TABLE_ID = "ID";
	public static final String TABLE_LOGIC_ID = "LOGIC_ID";
	private static final long serialVersionUID = -13940115889548L;
	// 主键
	protected long id;
	// 逻辑ID
	protected long logicId;
	// 接收号码
	protected String receiveNum;
	// 接收人
	protected String receiveName;
	// 短信内容
	protected String msg;
	// 发送时间
	protected LocalDateTime sendTime;
	// 发送者
	protected String sendName;
	// 优先发送(1优先,0不优先)
	protected String priority;
	// 应用信息
	protected String appInfo;
	// 数据对象唯一标识
	protected long objId;
	// 接收回执URL地址(带http://的全路径地址)
	protected String returnUrl;
	// 接收回执参数(SMSJson对象类型的JSON格式)
	protected String returnParams;
	// 修改时间
	protected LocalDateTime updateTime;
	// 是否需要回复(2.选人,1.需要,0.否)
	protected String ext1;
	// 短信验证码
	protected String ext2;
	// 是否允许发送（默认0否，1是）
	protected String ext3;
	// 扩展字段4
	protected String ext4;
	// 租户逻辑ID
	protected String ext5;

	/**
	 * 得到对象的哈希值
	 *
	 * @return int 对象的哈希值
	 */
	@Override
	public int hashCode() {
		return new HashCodeBuilder().append(this.getId()).toHashCode();
	}

	/**
	 * 比较两个对象是否相等
	 *
	 * @param other
	 *            要比较的对象
	 * @return boolean 相同返回true，否则返回flase
	 */
	@Override
	public boolean equals(final Object other) {
		if (!(other instanceof SMSToDoObj)) {
			return false;
		}
		final SMSToDoObj castOther = (SMSToDoObj) other;
		return new EqualsBuilder().append(this.getLogicId(), castOther.getLogicId()).isEquals();
	}

	/**
	 * 返回对象的字符串值
	 *
	 * @return String 表示用户对象的字符串值
	 */
	@Override
	public String toString() {
		return new ToStringBuilder(this).append("短信待发列表", this.getId()).toString();
	}

	public long getId() {
		return id;
	}

	public void setId(final long id) {
		this.id = id;
	}

	public long getLogicId() {
		return logicId;
	}

	public void setLogicId(final long logicId) {
		this.logicId = logicId;
	}

	public String getReceiveNum() {
		return receiveNum;
	}

	public void setReceiveNum(final String receiveNum) {
		this.receiveNum = receiveNum;
	}

	public String getReceiveName() {
		return receiveName;
	}

	public void setReceiveName(final String receiveName) {
		this.receiveName = receiveName;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(final String msg) {
		this.msg = msg;
	}

	public LocalDateTime getSendTime() {
		return sendTime;
	}

	public void setSendTime(final LocalDateTime sendTime) {
		this.sendTime = sendTime;
	}

	public String getSendName() {
		return sendName;
	}

	public void setSendName(final String sendName) {
		this.sendName = sendName;
	}

	public String getPriority() {
		return priority;
	}

	public void setPriority(final String priority) {
		this.priority = priority;
	}

	public String getAppInfo() {
		return appInfo;
	}

	public void setAppInfo(final String appInfo) {
		this.appInfo = appInfo;
	}

	public long getObjId() {
		return objId;
	}

	public void setObjId(final long objId) {
		this.objId = objId;
	}

	public String getReturnUrl() {
		return returnUrl;
	}

	public void setReturnUrl(final String returnUrl) {
		this.returnUrl = returnUrl;
	}

	public String getReturnParams() {
		return returnParams;
	}

	public void setReturnParams(final String returnParams) {
		this.returnParams = returnParams;
	}

	public LocalDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(final LocalDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public String getExt1() {
		return ext1;
	}

	public void setExt1(final String ext1) {
		this.ext1 = ext1;
	}

	public String getExt2() {
		return ext2;
	}

	public void setExt2(final String ext2) {
		this.ext2 = ext2;
	}

	public String getExt3() {
		return ext3;
	}

	public void setExt3(final String ext3) {
		this.ext3 = ext3;
	}

	public String getExt4() {
		return ext4;
	}

	public void setExt4(final String ext4) {
		this.ext4 = ext4;
	}

	public String getExt5() {
		return ext5;
	}

	public void setExt5(final String ext5) {
		this.ext5 = ext5;
	}

}
